﻿using Iworld.basis.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace Iworld.Author.Service.Backstage.Import
{
    /// <summary>
    /// 改变提现状态
    /// </summary>
    [DataContract]
    public class ChangeWithdrawalsStatusImport : CheckAdministratorImportBase, Iworld.Author.Manager.WithdrawalsRecordManager.IPackageForChangeStatus
    {
        [DataMember]
        public int WithdrawalsId { set;get;}

        [DataMember]
        public Model.WithdrawalsStatus NewStatus {set; get;}

        [DataMember]
        public string Remark {set; get;}

        public override void CheckAllowExecuteOrNot(Main.Impl.ModelToDbContext db)
        {
            base.CheckAllowExecuteOrNot(db);
            if(!Self.Group.CanReviewWithdrawals)
            {
                throw new Exception("你无权审批提现");
            }
        }
    }
}
